package config

import "time"

var DefaultDatabaseConfig = &DatabaseConfig{
	Type:   "mysql",
	Debug:  true,
	Dsn:    "root:123456@tcp(127.0.0.1:3306)/demo?charset=utf8mb4&parseTime=True&loc=Local",
	Prefix: "",
}

type DatabaseConfig struct {
	Type         string        `mapstructure:"type"`
	Debug        bool          `mapstructure:"debug"`
	Dsn          string        `mapstructure:"dsn"`
	Prefix       string        `mapstructure:"prefix"`
	MaxIdleConns int           `mapstructure:"max_idle_conns"`
	MaxOpenConns int           `mapstructure:"max_open_conns"`
	MaxLifetime  time.Duration `mapstructure:"max_lifetime"`
}
